//
//  SearchCompanyCell.m
//  MyProject
//
//  Created by 石小强 on 2018/4/26.
//  Copyright © 2018年 yanjiaming. All rights reserved.
//

#import "SearchCompanyCell.h"

@implementation SearchCompanyCell

- (void)setModel:(CompanyModel *)model {
    _model = model;
    
    self.nameL.text = model.companyAbbreviatedName; // model.industryName
    self.categoryL.text = [NSString stringWithFormat:@"%@/%@/%@",model.industryName,model.financingScaleName,model.personnelScaleName];
    
    if (model.companyAddress && model.companyAddress.length > 0 && model.incumbentCount && model.incumbentCount.length > 0) {
        self.addressAndNumL.text = [NSString stringWithFormat:@"%@ | %@名认证员工点评",model.companyAddress,model.incumbentCount];
    } else {
        if (model.companyAddress && model.companyAddress.length > 0) {
            self.addressAndNumL.text = [NSString stringWithFormat:@"%@", model.companyAddress];
        } else if (model.incumbentCount && model.incumbentCount.length) {
            self.addressAndNumL.text = [NSString stringWithFormat:@"%@名认证员工点评", model.incumbentCount];
        } else {
            self.addressAndNumL.text = @"0名认证员工点评";
        }
    }
    
    self.scoreL.text = [NSString stringWithFormat:@"%.1f分",[model.avgScore floatValue]];
}

@end
